package com.global.emc.security.authentication;

import java.util.List;

import com.global.emc.core.CoreUser;
import com.global.emc.core.exception.impl.EMCException;
import com.global.emc.security.chain.command.CoreUserCommand;

/**   
 *  
 * @Description:  [权限管理]   
 * @Author:       [Joly_Huang]   
 * @CreateDate:   [2014年3月17日 下午1:26:39]   
 * @UpdateUser:   [Joly_Huang]   
 * @UpdateDate:   [2014年3月17日 下午1:26:39]   
 * @UpdateRemark: [说明本次修改内容]  
 * @Version:      [v1.0] 
 *    
 */
public class AuthorityCommand implements CoreUserCommand {
	
	private List<AuthorityHandler> authorityHandlers;
	
	public List<AuthorityHandler> getAuthorityHandlers() {
		return authorityHandlers;
	}

	public void setAuthorityHandlers(List<AuthorityHandler> authorityHandlers) {
		this.authorityHandlers = authorityHandlers;
	}


	@Override
	public void execute(CoreUser coreUser) throws EMCException {
		for(AuthorityHandler authorityHandler : authorityHandlers){
			authorityHandler.handlerAuthorities(coreUser);
		}
	}

}
